using System.Runtime.InteropServices;

namespace Triton.Game
{
	[StructLayout(LayoutKind.Sequential, Pack = 1)]
	public struct RectWin32
	{
		public int Left;

		public int Top;

		public int Right;

		public int Bottom;

		public bool Within(int x, int y)
		{
			if (x > Left && x < Right && y > Top)
			{
				return y < Bottom;
			}
			return false;
		}

		public override string ToString()
		{
			return $"Left: {Left}, Top: {Top}, Right: {Right}, Bottom: {Bottom}";
		}
	}
}
